import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import local_remove from '@dfeidao/atom-web/local/remove';
import local_set from '@dfeidao/atom-web/local/set';
import a002 from './a002';
// 搜索查询
export default async function a004(fd: IFeidaoAiBrowserComponent) {
	// 获取查询框关键字并存储
	const seachkey = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="seachkey123"]').value.trim();
	if (seachkey) {
		local_set(fd, 'seachkey', { $like: `%${seachkey}%` });
	} else {
		local_remove(fd, 'seachkey');
	}
	// 获取客户端类型并存储
	// const client_point_id = fd.data.node.querySelector<HTMLSelectElement>('[data-feidao-id="client_point_id"]').value;
	// local_set(fd, "client_point_id", client_point_id);

	local_remove(fd, "page_no");
	// 调用查询事件
	a002(fd);
}
